<template>
  <div class="">
    <div class="header">
      <div class="seach head-item">业务详情</div>
      <div class="head-item head-right">
        <div class="head-item head-handle-btn" style="display: flex">
          <div class="arrc">
            <button
              class="cl-button cl-button--primary"
              @click="closeAddTemplate"
            >
              返回
            </button>
          </div>
        </div>
      </div>
    </div>
    <div class="headers">
      <div class="contntPd">
        <div class="contntFlex">
          <div class="contntTitle">业务编号： {{ this.dataList.id }}</div>
          <div style="margin-left: 180px" class="contntTitle">
            销售渠道： {{ this.dataList.channelName }}
          </div>
        </div>
        <div class="contntFlex">
          <div class="contntTitle">
            产品名称： {{ this.dataList.platfromName }}
          </div>
          <div style="margin-left: 180px" class="contntTitle">
            产品Code： {{ this.dataList.productCode }}
          </div>
        </div>
        <div class="contntFlex">
          <div class="contntTitle">
            开通时间： {{ this.dataList.busStartTime }}
          </div>
          <div style="margin-left: 180px" class="contntTitle">
            到期时间： {{ this.dataList.busExpiredTime }}
          </div>
        </div>
        <div class="contntFlex">
          <div class="contntTitle">
            业务状态： {{ this.dataList.status | Source }}
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import * as channelManageApi from "@/api/request/channelManageApi";
export default {
  props: ["dataList", "picSearchOptions"],
  components: {},
  data() {
    return {
      messageView: false,
      add: "",
      dataDetail: {
        id: null,
        channelName: "",
        channelCode: "",
        createTime: "",
        customerName: "",
        customerPhone: "",
        securityKey: "",
        status: 1,
        webSite: "",
        channelLevel: 1,
      },
    };
  },
  filters: {
    Source: function (row) {
      switch (row) {
        case 0:
          return "开通中";
        case 1:
          return "已开通";
        case 4:
          return "已释放";
        case 5:
          return "已退款";
        case 6:
          return "升级中";
        case 7:
          return "已过期";
      }
    },
  },
  methods: {
    async postCreate(options) {
      await channelManageApi.postCreate(this.dataDetail).catch((i) => {
        if (i.status === 201) {
          this.$notify({
            customClass: "notify-success", //  notify-success ||  notify-error
            message: `新建成功!`,
            showClose: false,
            duration: 1000,
          });
        } else {
          this.$notify({
            customClass: "notify-error", //  notify-success ||  notify-error
            message: `新建失败!`,
            showClose: false,
            duration: 1000,
          });
        }
      });
      this.getList();
    },

    // 关闭
    closeAddTemplate() {
      this.$router.push({
        path: "/business/businessmanage",
      });
    },
    //刷新页面
    getList() {
      this.$emit("getList");
    },
    // 置空搜索
    empty() {
      this.picSearchOptions.ChannelName = "";
      this.picSearchOptions.ChannelCode = "";
      this.getList();
    },

    searchEnterFun() {
      this.getList();
    },
    //
  },
};
</script>


<style  lang="scss" scoped>
@import "@/styles/content-manage/manage-head.scss";
.contntPd {
  padding: 20px;
}
.contntTitle {
  color: #262626;
  font-size: 12px;

  width: 260px;
}
.contntFlex {
  display: flex;
  justify-items: center;
  margin-bottom: 12px;
}
.header {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  background: #fff;
  border: 1px solid #d7d8d9;
  border-radius: 2px;
  height: 45px !important;
  margin: 0 16px 0px 16px;
  padding: 0 24px;
}
.headers {
  background: #fff;
  border: 1px solid #d7d8d9;
  border-radius: 2px;

  margin: 0 16px 24px 16px;
}
.arrc {
  cursor: pointer;
  text-align: center;
  width: 90px;
  font-size: 12px;
  border-radius: 2px;
  margin-right: 20px;
}
.seach {
  margin-left: -4px;
  font-size: 14px;
}
.upload-wrap {
  &:hover {
    opacity: 0.8;
  }
}
.head-middle {
  margin-left: 0;
  padding-right: 0;
  margin-right: auto;
}
.handle-batch button {
  padding: 9px 16px;
  margin: 0;
  min-width: 60px;
}
.icon_hover {
  color: rgb(215, 216, 217);
}
.icon_hover:hover {
  color: #999;
}
</style>
